import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home'
import homebody from '@/components/homebody'
import feedback from '@/components/process/feedback'
import contactus from '@/components/process/contactus'
import webrecomment from '@/components/process/webrecomment'
import blank from '@/components/blank'
import foodrecommend from '@/components/foodrecommend'
import cookbook from '@/components/cookbook'
import todayfood from '@/components/todayfood'
import foodBBS from '@/components/foodBBS'
import foodBBSChild from '@/components/foodBBS_child'
import basefood from '@/components/basefood'
import frontres from '@/components/frontres'
import frontlogin from '@/components/frontlogin'
import foodrecom_child from '@/components/foodrecom_child'
import user from '@/components/user'
import BuyCar from '@/components/BuyCar'
Vue.use(Router)

export default new Router({
  mode:"history",
  routes: [
    {
      path:'/home',
      name:'home',
      component:home,
      children:[
        {path:'/',component:homebody},
        {path:'/home/feedback',component:feedback},
        {path:'/home/contactus',component:contactus},
        {path:'/home/webrecomment',component:webrecomment},
        {path:'/home/foodrecommend',component:foodrecommend},
        {path:'/home/cookbook',component:cookbook},
        {path:'/home/todayfood',component:todayfood},
        {path:'/home/foodBBS',component:foodBBS,children:[{path:'/',component:foodBBSChild}]},
        {path:'/home/basefood',component:basefood},
        {path:'/home/frontres',component:frontres},
        {path:'/home/frontlogin',component:frontlogin},
        {path:'/home/foodrecom_child',component:foodrecom_child},
        {path:'/home/user',component:user},
        {path:'/home/BuyCar',component:BuyCar},
      ],
    },
    {
      path:'/blank',
      component:blank,
    },
    {
      path:'*',redirect:'/home'
    },
  ]
})
